import { request } from '@/utils/request'


/**
 * 获取图片路径
 * @param {file} data
 */
export const uploadimg = (data) => {
  return request({
    url: '/api/common/upload',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data',
    },
    data,
  })
}

/**
 * 上传头像
 * @param  {String} avatar 图片路径
 *  
 * */ 
export const uploadavatar = (params) => {
  return request({
    url: `/api/user/avatar`,
    method: 'put',
    params,
  })
}
